import javax.swing.*;
import java.awt.*;

class TodoList extends JFrame
{
	Container pane = getContentPane();
	JMenuBar menuBar = new JMenuBar();
	JMenuItem[] menuItem = {
			new JMenuItem(), new JMenuItem(), new JMenuItem(),
			new JMenuItem(), new JMenuItem(), new JMenuItem(),
			new JMenuItem()
	};


	public TodoList() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

		menuBar = new JMenuBar();

		menuItem[0] = new JMenuItem("파일(F)");
		menuItem[1] = new JMenuItem("편집(E)");
		menuItem[2] = new JMenuItem("도움말(H)");

		menuItem[3] = new JMenuItem("저장");
		menuItem[4] = new JMenuItem("할 일 추가...");
		menuItem[5] = new JMenuItem("종료");

		pane.setLayout(new BorderLayout());
		pane.add(menuBar, BorderLayout.NORTH);

		for (int i = 0; i < 3; i++) {
			menuBar.add(menuItem[i]);
		}
		for (int i = 3; i < 6; i++) {
			menuItem[0].add(menuItem[i]);
		}

		setTitle("TO-DO List");
		setSize(500, 600);
		setVisible(true);
	}
}

public class Main {
	public static void main(String[] args) {
		new TodoList();
	}
}
